package easyjava.qixi.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Table(name="interest")
@Entity
public class Interest {
	  @Id
	  @Column(name="id")
      private  int id;
	  @Column(name="name")
      private String name;
      @Column(name="level")
      private  int level;
      @ManyToOne
      @JoinColumn(name="user_id")
      private  User user;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@Override
	public String toString() {
		return "Interest [id=" + id + ", name=" + name + ", level=" + level + ", userId=" + user.getId() + "]";
	}
      
}
